#! /bin/bash 
# just a copy from  http://yaozb.blog.51cto.com/2762349/560462
if [ -z $1 ];then
	file="ips/com.google.www"
else
	file=$1
fi

for i in `cat $file`  #这个是逐个读取allip文件里的ip
do
	{
		ping=`ping -c 1 $i|grep loss|awk '{print $6}'|awk -F "%" '{print $1}'`
		if [ $ping -ne 100  ];then 
			echo -e "$i|" #| tee -a $file.ok
		fi
	}&
done
